<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="commons/head::myhead(~{::title},~{::link})">
    <title>login</title>
    <!-- login CSS -->
    <link type="text/css" rel="stylesheet" href="asserts/css/login.css" th:href="@{/asserts/css/login.css}">
</head>
<body class="text-center">
    <form class="form-login" action="commons/success.html" th:action="@{/action/login}" method="POST">
        <img class="mb-4" th:src="@{/asserts/img/dronesystem.svg}" src="asserts/img/dronesystem.svg" alt="" width="72" height="72">
        <h1 class="h3 mb-3 font-weight-normal" th:text="#{dronesystem.logintip}">Please sign in</h1>
        <!-- 报错显示 -->
        <p style="color: red" th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></p>
        <div class="form-group">
            <label class="sr-only" th:text="#{common.loginway}">Loginway</label>
            <select class="form-control" name="type">
                <option th:text="QQ" th:value="QQ">1</option>
            </select>
        </div>
        <label class="sr-only" th:text="#{common.loginway}">Loginway</label>
        <input type="text"  name="loginway" class="form-control" placeholder="Loginway" th:placeholder="#{common.loginway}" required="" autofocus=""/>
        <label class="sr-only" th:text="#{user.name}">Username</label>
        <input type="text"  name="username" class="form-control" placeholder="Username" th:placeholder="#{user.name}" required="" autofocus=""/>
        <label class="sr-only" th:text="#{common.password}">Password</label>
        <input type="password" name="password" class="form-control" placeholder="Password" th:placeholder="#{common.password}" required=""/>
        <div class="checkbox mb-3">
            <label>
                  <input type="checkbox" value="remember-me"/> [[#{common.remember}]]
            </label>
        </div>
        <button class="btn btn-lg btn-primary btn-block" type="submit" th:text="#{btn.login}">Sign in</button>
        <p class="mt-5 mb-3 text-muted">© 2019-2020</p>
        <a class="btn btn-sm" th:href="@{/login(l='zh_CN')}">中文</a>
        <a class="btn btn-sm" th:href="@{/login(l='en_US')}">English</a>
    </form>

    <div th:replace="commons/head::myscript(~{::script})">
        <script type="text/javascript"></script>
    </div>
</body>
</html>